package com.edu.gcu.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.edu.gcu.annotation.Excel;
import com.edu.gcu.core.domain.BaseEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.io.Serial;
import java.util.Date;

/**
 * 打卡记录表 sys_clockin
 *
 * @author luomang
 */
@Data
@EqualsAndHashCode(callSuper = true)
@TableName(value = "sys_clockin")
public class SysClockin extends BaseEntity {
    @Serial
    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    /**
     * 打卡ID
     */
    @TableId(value = "clockIn_id", type = IdType.AUTO)
    @Excel(name = "参数主键", cellType = Excel.ColumnType.NUMERIC)
    private Long clockInId;

    /**
     * 用户ID
     */
    @TableField(value = "user_id")
    @Excel(name = "用户ID", cellType = Excel.ColumnType.NUMERIC)
    private Long userId;

    /**
     * 部门ID
     */
    @TableField(value = "dept_id")
    @Excel(name = "部门ID", cellType = Excel.ColumnType.NUMERIC)
    private Long deptId;

    /**
     * 打卡类型（0上班 1下班）
     */
    @TableField(value = "type")
    @Excel(name = "打卡类型", readConverterExp = "0=上班,1=下班")
    private String type;

    /**
     * 打卡时间
     */
    @TableField(value = "time")
    @Excel(name = "打卡时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date time;

    /**
     * 打卡地点
     */
    @Excel(name = "打卡地点")
    @TableField(value = "location")
    private String location;

    /**
     * 打卡状态（0成功 1迟到 2早退 3缺勤 4其他）
     */
    @TableField(value = "status")
    @Excel(name = "打卡状态", readConverterExp = "0=成功,1=迟到,2=早退,3=缺勤,4=其他")
    private String status;
}
